<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}小说网站{% endblock %}</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: 'Microsoft YaHei', sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #f5f5f5;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }
        header {
            background-color: #333;
            color: #fff;
            padding: 15px 0;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .logo {
            font-size: 24px;
            font-weight: bold;
        }
        nav ul {
            display: flex;
            list-style: none;
        }
        nav ul li {
            margin-left: 20px;
        }
        nav ul li a {
            color: #fff;
            text-decoration: none;
            transition: color 0.3s;
        }
        nav ul li a:hover {
            color: #ffd700;
        }
        main {
            padding: 20px 0;
            min-height: calc(100vh - 150px);
        }
        footer {
            background-color: #333;
            color: #fff;
            text-align: center;
            padding: 20px 0;
            margin-top: 30px;
        }
        .book-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }
        .book-card {
            background-color: #fff;
            border-radius: 5px;
            overflow: hidden;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            transition: transform 0.3s;
        }
        .book-card:hover {
            transform: translateY(-5px);
        }
        .book-cover {
            width: 100%;
            height: 200px;
            object-fit: cover;
        }
        .book-info {
            padding: 15px;
        }
        .book-title {
            font-size: 18px;
            margin-bottom: 5px;
        }
        .book-author {
            color: #666;
            font-size: 14px;
            margin-bottom: 10px;
        }
        .book-description {
            font-size: 14px;
            color: #555;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .btn {
            display: inline-block;
            background-color: #333;
            color: #fff;
            padding: 8px 15px;
            border-radius: 3px;
            text-decoration: none;
            margin-top: 10px;
            transition: background-color 0.3s;
        }
        .btn:hover {
            background-color: #555;
        }
        .novel-detail {
            background-color: #fff;
            border-radius: 5px;
            padding: 20px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .novel-header {
            display: flex;
            margin-bottom: 20px;
        }
        .novel-cover {
            width: 200px;
            height: 300px;
            object-fit: cover;
            border-radius: 5px;
            margin-right: 20px;
        }
        .novel-meta {
            flex: 1;
        }
        .novel-title {
            font-size: 24px;
            margin-bottom: 10px;
        }
        .novel-author {
            font-size: 16px;
            color: #666;
            margin-bottom: 10px;
        }
        .novel-description {
            margin-top: 15px;
            line-height: 1.8;
        }
        .chapter-list {
            margin-top: 20px;
        }
        .chapter-item {
            padding: 10px 0;
            border-bottom: 1px solid #eee;
        }
        .chapter-item a {
            color: #333;
            text-decoration: none;
            transition: color 0.3s;
        }
        .chapter-item a:hover {
            color: #ff6b6b;
        }
        .chapter-content {
            background-color: #fff;
            border-radius: 5px;
            padding: 30px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            line-height: 1.8;
        }
        .chapter-title {
            font-size: 22px;
            margin-bottom: 20px;
            text-align: center;
        }
        .chapter-nav {
            display: flex;
            justify-content: space-between;
            margin-top: 30px;
        }
        @media (max-width: 768px) {
            .novel-header {
                flex-direction: column;
            }
            .novel-cover {
                width: 100%;
                height: auto;
                margin-right: 0;
                margin-bottom: 15px;
            }
            .book-list {
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            }
        }
    </style>
</head>
<body>
    <header>
        <div class="container header-content">
            <div class="logo">小说阅读网</div>
            <nav>
                <ul>
                    <li><a href="{{ url_for('index') }}">首页</a></li>
                </ul>
            </nav>
        </div>
    </header>

    <main class="container">
        {% block content %}{% endblock %}
    </main>

    <footer>
        <div class="container">
            <p>&copy; 2025 小说阅读网. 保留所有权利.</p>
        </div>
    </footer>
</body>
</html>